<template>
    <div class="section-container">
      <div class="header">
        <h3 class="title">{{ title }}</h3>
        <slot name="header-extra"></slot>
      </div>
      <div class="content">
        <slot></slot>
      </div>
    </div>
  </template>
  
  <script setup>
  defineProps({
    title: {
      type: String,
      required: true
    }
  })
  </script>
  
  <style lang="scss" scoped>
  .section-container {
    margin: 16px;
    background: var(--van-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--van-box-shadow-light);
  
    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 16px;
      background: var(--van-gray-1);
  
      .title {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: var(--van-text-color);
      }
    }
  
    .content {
      padding: 12px 16px;
    }
  }
  </style>